<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('VIEW列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								渠道商：<input type="text" name="channelUserName"/>
							</li>

							<li>
								商户名称：<input type="text" name="businessUserName"/>
							</li>
							<li class="select-time">
								<label>统计时间：</label>
								<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
								<span>-</span>
								<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm" id="toolbar" role="group">
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="channel:vwChannelBusinessCashDayStat:export">
						<i class="fa fa-download"></i> 导出
				 </a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "channel/vwChannelBusinessCashDayStat";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "vwChannelBusinessCashDayStat",
				sortName: "createTime",
				sortOrder: "desc",
		        showExport: true,
                columns: [
				{
					field : 'channelUserName', 
					title : '码商代理',
					sortable: true
				},
				{
					field : 'businessUserName', 
					title : '商户',
					sortable: true
				},
				{
					field : 'createTime', 
					title : '统计时间',
					sortable: true
				},
				{
					field : 'sjjeSum', 
					title : '收款金额',
					sortable: true
				},
				{
					field : 'feeSum', 
					title : '手续费',
					sortable: true
				},
				{
					field : 'receiveSuccessSum', 
					title : '收款成功次数',
					sortable: true
				},
				{
					field : 'receiveSum', 
					title : '收款次数',
					sortable: true
				},
				{
					field : 'sucessRate', 
					title : '成功率',
					sortable: true
				}
		        ]
            };
            $.table.init(options);
        });
		// window.setInterval(function(){
		// 	$.table.refresh();
		// }, 5000)
    </script>
</body>
</html>